package com.sskj.level.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.level.bean.SpreadBean;
import com.sskj.level.http.HttpConfig;
import com.sskj.level.presenter.BasePresenter;
import com.sskj.level.ui.activity.ShareActivity;
import com.sskj.lib.http.JsonCallBack;

/**
 * @author Hey
 * Create at  2019/08/29
 */
public class SharePresenter extends BasePresenter<ShareActivity> {

    public void apiUserRegisterlink() {
        httpService.apiUserRegisterlink().execute(new JsonCallBack<HttpData<SpreadBean>>() {
            @Override
            public void onSuccess(Response<HttpData<SpreadBean>> response) {
                HttpData<SpreadBean> httpData = response.body();
                if (httpData.getStatus() == HttpConfig.OK) {
                    mView.updateUI(httpData.getData());
                }
            }
        });
    }
}
